package jmine.tec.hydra.export;

import java.util.ArrayList;
import java.util.List;

import jmine.tec.hydra.dao.HydraActivationDAO;
import jmine.tec.hydra.dao.HydraSpecificationDAO;
import jmine.tec.hydra.dao.filter.HydraFilterDAO;
import jmine.tec.hydra.domain.HydraSystem;
import jmine.tec.hydra.services.incluir.HydraSystemService;
import jmine.tec.services.api.export.AbstractServiceFillerEntityExporter;
import jmine.tec.services.api.export.DefaultExportAction;

/**
 * Exportador de HydraSystem
 * 
 * @author lundberg
 */
public class HydraSystemExporter extends AbstractServiceFillerEntityExporter<HydraSystem> {

    private HydraActivationDAO hydraActivationDAO;

    private HydraFilterDAO hydraFilterDAO;

    private HydraSpecificationDAO hydraSpecificationDAO;

    /**
     * Construtor
     */
    public HydraSystemExporter() {
        super(new HydraSystemService(), DefaultExportAction.INCLUIR);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<Object> exportAfter(HydraSystem entity) {
        List<Object> details = new ArrayList<Object>();
        details.addAll(this.hydraActivationDAO.findBySystem(entity));
        details.addAll(this.hydraFilterDAO.findBySystem(entity));
        details.addAll(this.hydraSpecificationDAO.findBySystem(entity));
        return details;
    }

    /**
     * @param hydraActivationDAO the hydraActivationDAO to set
     */
    public void setHydraActivationDAO(HydraActivationDAO hydraActivationDAO) {
        this.hydraActivationDAO = hydraActivationDAO;
    }

    /**
     * @param hydraFilterDAO the hydraFilterDAO to set
     */
    public void setHydraFilterDAO(HydraFilterDAO hydraFilterDAO) {
        this.hydraFilterDAO = hydraFilterDAO;
    }

    /**
     * @param hydraSpecificationDAO the hydraSpecificationDAO to set
     */
    public void setHydraSpecificationDAO(HydraSpecificationDAO hydraSpecificationDAO) {
        this.hydraSpecificationDAO = hydraSpecificationDAO;
    }
}
